home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
Graphics
/
PostScript
/
Scott
/
hslide.ps
next >
Wrap
Text File
|
1995-06-12
|
4KB
|
130 lines
%% hslide.ps
%%
%% Written April 29, 1990,
%% Scott Hess
%% NeXT Campus Consultant
%% Gustavus Adolphus College
%% St. Peter, Mn 56082
%% scott@gacvax1.bitnet
%%
%% This program slides the bottom section of the Workspace off the screen to
%% the right, drops the rest to cover that area, and loops until the whole
%% screen is gone.
%% This file may be installed so that the Scene application will bring it up
%% under the Movies menu. To do this, create a directory within the
%% /NextLibrary/Images/Scene_movies directory named hslide.movie. Inside this
%% directory, place this file, with the name hslide.script.ps. Then, run
%% Scene, and there you are. This really belongs in the /LocalLibrary
%% directory, but unfortunately, Scene will not find it there. Sad, eh?
%% This code is freely released into the public domain. You may cut/paste,
%% slash, rearrange, remove comments, and otherwise mutilate this code
%% with no fear of reprisal from myself. So, go ahead! I want to see more
%% screen hacks, people!
%% scott
%% Grab the Workspace and draw it in the passed window.
/getWorkspace % window
{
gstate /dest exch def
/tempwin 0 0 1120 832 Nonretained window def
tempwin windowdeviceround
/tgs gstate def
false tempwin setautofill
Above 0 currentwindow orderwindow
dest setgstate 0 0 1120 832 tgs 0 0 Copy composite
tempwin termwindow
} def
%% Move a region of the current gstate.
/shift %% x y w h dx dy
{
4 index add
exch 5 index add
exch
gstate
3 1 roll
Copy composite
} def
%% Return after mouseclick accepted.
/waitmouse
{
{ buttondown {exit} if} loop
{ stilldown not {exit} if} loop
} def
gsave
%% get a window the size of the Workspace.
/win 0 0 1120 832 Buffered window def
win windowdeviceround
currentwindow getWorkspace
%% Move the psuedo-Workspace to the front.
Above 0 win orderwindow
%% How fast to shift. Not really needed, now.
/shiftby 4 def
0.0 setgray %% leave behind Black
32 %% 32 strips of 26 pixels high.
{
0 0 1120 26 shiftby 0 shift %% shift the strip to the right.
0 0 shiftby 26 rectfill %% and fill in the opened area.
flushgraphics %% flush that.
shiftby shiftby 1120 %% shift all the way across.
{
pop %% forget that number.
0 0 1120 26 shiftby 0 shift %% shift the strip to the right.
%% (don't have to fill in opened
%% area anymore :-)
flushgraphics %% flush the output.
buttondown {exit} if %% if button is down, leave.
} for
buttondown {exit} if %% get out right away in case of button.
0 0 1120 832 0 -26 shift %% drop the rest of the screen.
0 806 1120 26 rectfill %% fill in the top. Note that the
%% same thing as above could be
%% done, just not so easy, now.
(../../../NextLibrary/Sounds/Bonk.snd) 1 playsound
%% Bonk.
flushgraphics %% make sure the user sees it!.
buttondown {exit} if %% could have been a buttondown in there.
}
repeat
waitmouse %% wait for that buttondown.
win termwindow %% get rid of the window.
grestore
rkspace and draw it in the passed window.
/getWorkspace % window
{
gstate /dest exch def
/tempwin 0 0 1120 832 Nonretained window def
tempwin windowdeviceround
/tgs gstate def
false tempwin setautofill
Above 0 currentwindow orderwindow
dest setgstate 0 0 1120 832 tgs 0 0 Copy composite
tempwin termwindow
} def
%% Move a region of the current gstate.
/shift %% x y w h dx dy
{
4 index add
exch 5 index add
exch
gstate
3 1 roll
Copy composite
} def